package com.example.basemodule

import android.content.Context

fun Context.getWidth(): Int {
    return this.resources.displayMetrics.widthPixels
}

fun Context.getHeight():Int{
    return this.resources.displayMetrics.heightPixels
}

fun Context.getStatusHeight(): Int {
    val resourceId=this.resources.getIdentifier("status_bar_height","dimen","android")
    if(resourceId>0){
        return this.resources.getDimensionPixelSize(resourceId)
    }else{
        return 0
    }
}
